package common

type Property struct {
	Key   string
	Value string
}
type WidgetInfo struct {
	SkinTempName   string
	BaseWidgetName string
	Properties     map[string]string
	UserInfo       map[string]string
}

func NewWidgetInfo(baseWidgetName, SkinName string) *WidgetInfo {
	return &WidgetInfo{
		BaseWidgetName: baseWidgetName,
		SkinTempName:   SkinName,
		Properties:     make(map[string]string),
		UserInfo:       make(map[string]string),
	}
}

func (w *WidgetInfo) SetProperty(key, value string) {
	w.Properties[key] = value
}

func (w *WidgetInfo) GetSkinTempName() string {
	return w.SkinTempName
}

func (w *WidgetInfo) SetAttribute(key, value string) {
	w.Properties[key] = value
}
